Skip to content

Conversation

@gerrod3
Copy link
Contributor

@gerrod3 gerrod3 commented Oct 28, 2025

Requires adding the trusted publisher to each project + client's PyPI page. Also, the GitHub "pypi" environment we are using is autocreated once the workflow is merged and ran, but you can create it before hand and assign it permissions for when it is allowed to run. In ostree I created it before hand and applied the same branch protection rules we use to only allow the environment to run on protected branches.

https://docs.github.com/en/actions/reference/workflows-and-actions/deployments-and-environments

@gerrod3
Copy link
Contributor Author

gerrod3 commented Oct 28, 2025

It might make sense to put these changes behind a new template variable so plugins can adopt when they have time. Or we could do them all at once and spend a Monday getting everyone straight.

Comment on lines +33 to +35
environment:
name: "pypi"
url: "https://pypi.org/p/{{ plugin_name | dash }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This environment is the new GH thing for describing the "environment for a deployment" and the deployment in our case being the "upload to pypi".
You specify url here and not for the bindings. Is it needed or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my googling no it isn't needed. It's set in the example on PyPI, but I think it's just extra context for where the environment is publishing. The bindings could contain multiple projects so one url wouldn't be "correct".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sad, but I'll leave it to your discretion.

@gerrod3
Copy link
Contributor Author

gerrod3 commented Oct 30, 2025

@ggainey ggainey merged commit 8d132b2 into pulp:main Nov 13, 2025
11 checks passed
@gerrod3 gerrod3 deleted the trusted-publisher branch November 13, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants